package com.atguigu.eduservice.client;

import com.atguigu.commonutils.vo.UcenterMemberVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: shy
 * @Date: 2021/06/21/19:33
 * @Description:
 */

@Component
@FeignClient(value = "service-order", fallback = OrderClientImpl.class)  //指定调用的服务名，前提要注册到nacos注册中心中
public interface OrderClient  {
    //@PathVariable注解一定要指定参数名称，否则出错
    //根据【用户id、课程id】查询订单表中的状态
    @GetMapping("/eduorder/order/isBuyCourse/{memberId}/{courseId}")
    public Boolean isBuyCourse(@PathVariable("memberId") String memberId, @PathVariable("courseId") String courseId);
}